package com.example.first_android_project;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

public class Act1 extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_act1);
		Bundle b = getIntent().getExtras();
		String param1 = b.getString("param1");
		int param2=b.getInt("param2");
		Toast.makeText(getApplicationContext(), param1+
		Integer.toString(param2),Toast.LENGTH_LONG).show();
		Button quit= (Button) findViewById(R.id.quit);
		quit.setOnClickListener(btnclick);
	}
	private OnClickListener btnclick = new OnClickListener() {
		public void onClick(View v) {
		switch (v.getId()) {
		case R.id.quit:
		finish();
		break;
		}
		}
	};
}
